package com.isky.visual.test;

/**
 * @ClassName : Strategymain
 * @Description :
 * @Author :wudl
 * @Date: 2020-04-12 22:55
 */

public class Strategymain {

    public static void main(String[] args) {
//        Context context = new Context(new OperationAdd());
//        System.out.println("10 + 5 = " + context.executeStrategy(10, 5));
//
//        context = new Context(new OperationSubstract());
//        System.out.println("10 - 5 = " + context.executeStrategy(10, 5));
//
//        context = new Context(new OperationMultiply());
//        System.out.println("10 * 5 = " + context.executeStrategy(10, 5));


        String  str = " table_user as a right join table_job as b on a.cId = b.id left join table_salary as c on b.jID = c.id left join table_company as d on a.bID = d.id left join table_company as d on d.bID = d.id left join table_company as d on a.bID = d.id";
        String[] joins = str.split("join");

        for (String a :joins)
        {
            String[] as = a.split("as");
            for (String st:as)
            {
                System.out.println("***"+st);
            }

        }

    }

}
